const http= require('http');

const PORT=9000;

http.createServer((req,res)=>{
    console.log("req",req.method,req.headers)
    let buffer=[];
    req.on("data",(data)=>{
        buffer.push(data);
    })
    req.on("end",(data)=>{
        console.log(buffer);
       let result= Buffer.concat(buffer);
       console.log(result.toString('utf-8'))
       console.log('buffer',buffer.toString('utf-8'))
    })
}).listen(PORT,()=>{
    console.log(`服务已在端口:【${PORT}】启动`)
});

// setTimeout(() => {
//     console.log(1);
// }, 0);

// setTimeout(() => {
//     console.log(1);
// }, 0);

// setTimeout(() => {
//     console.log(1);
// }, 0);

// console.log(11);


